home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / shifta.z / shifta
Encoding:
Text File  |  1998-10-30  |  3.5 KB  |  72 lines

  1. SHIFTA(3I)                                             Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      SSHHIIFFTTAA - Performs an arithmetic shift
  6.  
  7. SSYYNNOOPPSSIISS
  8.      SSHHIIFFTTAA (([II==]_i,, [JJ==]_j))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The SSHHIIFFTTAA intrinsic function performs a right shift with sign
  18.      extension fill of the object _i by _j.  Its arguments are as follows:
  19.  
  20.      _i    The value to be shifted.  Must be of type Boolean, integer, real,
  21.           or Cray pointer.
  22.  
  23.      _j    The number of bits to shift the value.  Must be of type integer
  24.           or Boolean.  _j must be within the range 0 <= _j <= _s_i_z_e, where
  25.           _s_i_z_e is the size, in bits, of _i.  That is, if _i is a 64-bit
  26.           object, _j must be within the range 0 <= _j <= 64.
  27.  
  28.      For values of _j outside these ranges, SSHHIIFFTTAA returns an undefined
  29.      result.
  30.  
  31.      On UNICOS systems, an object is 64 bits.  On UNICOS/mk systems, an
  32.      object is 32 bits or 64 bits.  On IRIX systems, an object is 8 bits,
  33.      16 bits, 32 bits, or 64 bits.
  34.  
  35.      SSHHIIFFTTAA is an elemental function.  The name of this intrinsic cannot be
  36.      passed as an argument.
  37.  
  38. NNOOTTEESS
  39.      The bit representation of the logical data type is not consistent
  40.      among Cray Research systems.  For further details, see the _F_o_r_t_r_a_n
  41.      _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905.
  42.  
  43. RREETTUURRNN VVAALLUUEESS
  44.      SSHHIIFFTTAA returns a value of type Boolean on UNICOS and UNICOS/mk
  45.      systems.  It returns an integer result on IRIX systems.
  46.  
  47. EEXXAAMMPPLLEESS
  48.      The following section of Fortran code shows the SSHHIIFFTTAA function used
  49.      in the case where _i is of type integer.  The bit pattern of _i and the
  50.      bit pattern of the result are shown.  For clarity, a 16-bit value is
  51.      used rather than a 64-bit value.
  52.  
  53.           INTEGER I1, I2, I3
  54.           ...
  55.           I2 = 5
  56.           I3 = SHIFTA(I1,I2)
  57.  
  58.         ------------------------------------------------------------------------------------------------------------------------------
  59.        | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 |
  60.         ------------------------------------------------------------------------------------------------------------------------------
  61.                            II11 ((_i))
  62.  
  63.         ------------------------------------------------------------------------------------------------------------------------------
  64.        | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 00 | 00 | 00 |
  65.         ------------------------------------------------------------------------------------------------------------------------------
  66.                            II33 ((rreessuulltt))
  67.  
  68. SSEEEE AALLSSOO
  69.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  70.      printed version of this man page.
  71.  
  72.